package HLLib.control.HLButton;

import HLLib.base.HLGraphics;
import HLLib.base.HLString;

public class HLDescriptionButton extends HLButton {
    public byte mode;

    String decription;

    public HLDescriptionButton(int type, String chars, int num) {
        super(type, chars);
        this.decription = num + "";
        this.type = (byte) type;
    }

    public void Render(HLGraphics g) {
        if (visable) {
            int screenX = GetScreenX();
            int screenY = GetScreenY();
            if (backColor != 0xff00ff) {
                g.FillRect(screenX, screenY, width, height, backColor);
            }
            if (rimColor != 0xff00ff) {
                g.DrawRectRim(screenX, screenY, width, height, 1, rimColor);
            }
            int oldFontSize = HLGraphics.GetFontSize();
            g.DrawStringAdjustable(new HLString(text), textColor, textShadowColor, screenX, screenY, width, height, textStyle, LEFT_TOP);
            g.DrawStringAdjustable(new HLString(decription), this.textColor, this.textShadowColor, screenX, screenY, this.width, this.height, this.textStyle, RIGHT_TOP);

            if (haveBorder) {
                // HLFrame.Render(g, screenX, screenY, width, height);

            }
        }
    }

    public void ChangeDescription(int num) {
        this.decription = num + "";
    }

}
